package com.example.springboot.ytest.ytest;

public class FinalTest {
    public static void main(String[] args) {
        String s1 = "123";
        String s2 = "abc";
        final String fs = s1;
        System.out.println(fs);
//        fs = ""; // The final local variable fs cannot be assigned. It must be blank and not using a compound assignment
//        fs = s2; // The final local variable fs cannot be assigned. It must be blank and not using a compound assignment
        s1 = s2;
        System.out.println(fs);
        
        int i1 = 1;
        int i2 = 2;
        final int fi = i1;
        System.out.println(fi);
//        fi = i2; // The final local variable fi cannot be assigned. It must be blank and not using a compound assignment
        i1 = 3;
        System.out.println(fi);
    }
}
